package com.tianlan.blog.service;

import java.util.List;

import com.tianlan.blog.dto.CreateOrganization;
import com.tianlan.blog.entity.SysOrganization;

public interface SysOrganizationService {
	/**
	 * 创建组织
	 * @param organization
	 * @return boolean
	 */
	boolean createOrganization(SysOrganization organization);
	
	/**
	 * 更新组织
	 * @param organization
	 * @return boolean
	 */
	boolean updateOrganization(SysOrganization organization);
	
	/**
	 * 删除组织
	 * @param organizationId
	 * @return boolean
	 */
	boolean deleteOrganization(Integer organizationId);
	
	/**
	 * 根据父组织ID查询列表组合-存储过程
	 * @param parentId
	 * @return List<SysOrganization>
	 */
	List<SysOrganization> queryOrganizationByPanentId(Integer parentId);
	
	long checkOrganizationName(CreateOrganization org);
	long checkOrganizationKey(CreateOrganization org);
}
